"""
-*- coding: utf-8 -*-
@Author  : Link
@Time    : 2023/6/9 15:28
@Site    : 
@File    : DeviceInferface.py
@Software: PyCharm
@Remark  : 
"""
import random

from BenchUtils.log_utils import Print


class FakeSmu:
    @staticmethod
    def connect():
        Print.Warning("SMU高精度电源已连接!")
        return True

    @staticmethod
    def power_on():
        pass

    @staticmethod
    def power_off():
        pass

    @staticmethod
    def mv(fake_min: int, fake_max: int):
        """
        量电压
        """
        return random.randint(fake_min, fake_max)

    @staticmethod
    def mi(fake_min: int, fake_max: int):
        """
        量电流
        """
        return random.randint(fake_min, fake_max)


class FakeDigital:
    @staticmethod
    def connect():
        Print.Warning("Digital数字激励比对器已连接!")
        return True

    @staticmethod
    def get_result():
        return random.randint(0, 1)


if __name__ == '__main__':
    fake_digital = FakeDigital()
    print(fake_digital.get_result())
